﻿
@{
    ViewBag.Title = Resources.WebStringsWeb.WebTitle;
    Layout = "~/Views/Shared/_LayoutMobile.cshtml";
}

@section css {
    <link href="~/Assets/css/previewImage.css" rel="stylesheet" />
    <link href="~/Assets/css/mui.picker.min.css" rel="stylesheet" />
    <script src="~/Assets/js/mui.picker.js"></script>
    <script src="~/Assets/js/mui.picker.min.js"></script>
    <script src="~/Assets/js/mui.dtpicker.js"></script>
    <style>
        .mui-bar ~ .mui-content .mui-scroll-wrapper {
            top: 44px;
            height: auto;
        }

        .btn_addPic {
            display: block;
            position: relative;
            width: 53px;
            height: 53px;
            overflow: hidden;
            cursor: pointer;
            text-align: center;
        }

        .filePrew {
            display: block;
            position: absolute;
            top: 0;
            left: 0;
            width: 53px;
            height: 53px;
            opacity: 0;
        }
    </style>
}
<header class="mui-bar mui-bar-nav">
    <button type="button" class="mui-left mui-action-back mui-btn mui-btn-link mui-btn-nav mui-pull-left" style="color:white;">
        <span class="mui-icon mui-icon-left-nav" style=""></span>
    </button>
    <h1 class="mui-title" style="color:white;">修改应急演练</h1>
</header>

<div class="mui-content">
    <div class="mui-content-padded" style="margin: 5px;" ng-cloak ng-controller="EmergencyController" ng-init="
      Id='@(Request.QueryString["Id"].IsEmpty() ? "" : Request.QueryString["Id"])';
     MGetDrillForm(Id);
     ImageCount=[0,1,2,3,4];
     FileList=[];

     InitImgeUpload();
     GetParkList();
     GetDepartmentList();
     ">
        <form class="mui-input-group">
            <div class="mui-input-row">
                <label>园区</label>
                <select ng-model="DrillFormDetail.ParkId" ng-change="MGetPlaceList(AddModel.ParkId);">
                    <option value="">请选择园区</option>
                    <option ng-repeat="x in ParkList" value="{{x.Id}}">{{x.ParkName}}</option>
                </select>
            </div>
            <div class="mui-input-row">
                <label>场所</label>
                <select ng-model="DrillFormDetail.PlaceId">
                    <option value="">请选择场所</option>
                    <option ng-repeat="x in PlaceList" value="{{x.Id}}">{{x.PlaceName}}</option>
                </select>
            </div>

            <div class="mui-input-row">
                <label>演练时间</label>
                <input type="text" id="DrillTime" class="datetime" data-options='{}' ng-model="DrillFormDetail.DrillTime" readonly>
            </div>
            <div class="mui-input-row">
                <label>组织部门</label>
                <select ng-model="DrillFormDetail.DepartmentId">
                    <option value="">请选择部门</option>
                    <option ng-repeat="x in DepartmentList" value="{{x.Id}}">{{x.DepartmentName}}</option>
                </select>
            </div>
            <div class="mui-input-row">
                <label>演练类型</label>
                <select ng-model="DrillFormDetail.TypeId">
                    <option value="" selected>请选择演练类型</option>
                    <option value="1">桌面演练</option>
                    <option value="2">功能演练</option>
                    <option value="3">全面演练</option>
                </select>
            </div>
        </form>

        <h5 class="mui-content-padded">&nbsp;&nbsp;参加人员：</h5>
        <div class="mui-input-row" style="margin: 10px 5px;">
            <textarea id="textarea" rows="5" placeholder="此处输入参加人员" ng-model="DrillFormDetail.Member"></textarea>
        </div>
        <h5 class="mui-content-padded">&nbsp;&nbsp;总结概要：</h5>
        <div class="mui-input-row" style="margin: 10px 5px;">
            <textarea id="textarea" rows="5" placeholder="此处输入总结概要" ng-model="DrillFormDetail.Summary"></textarea>
        </div>
        <h5 class="mui-content-padded">&nbsp;&nbsp;备注：</h5>
        <div class="mui-input-row" style="margin: 10px 5px;">
            <textarea id="textarea" rows="5" placeholder="此处输入备注" ng-model="DrillFormDetail.Remark"></textarea>
        </div>

        <p ng-show="DrillFormDetail.FileList.length>0">&nbsp;&nbsp;&nbsp;&nbsp;相关照片</p>
        <div class="row image-list" style="margin-top:20px;margin-bottom:50px;">
            <img class="image-item space" style="display:inline-block;margin-left:10px;" ng-src="{{x.FilePath}}" width="50" data-preview-src="" data-preview-group="1" ng-repeat="x in DrillFormDetail.FileList" />
        </div>
        <p>&nbsp;&nbsp;添加照片</p>
        <div class="row image-list" style="margin-top:20px;margin-bottom:50px;">
            <div style="float:left;margin-left:10px;" ng-repeat="x in ImageCount" id="imagebox_{{x}}">
            </div>
        </div>
        <div class="mui-button-row" style="margin-top:150px;">
            <button type="button" ng-click="MEditEventReport(DrillFormDetail);" ng-disabled="Loading" class="mui-btn mui-btn-primary mui-btn-block">保 &nbsp;&nbsp;存</button>
        </div>
    </div>
</div>
<div style="height:80px;">

</div>

@section js{

    <script src="~/Assets/js/libs/upload.js"></script>
    <script src="~/Assets/js/mui.zoom.js"></script>
    <script src="~/Assets/js/mui.previewimage.js"></script>
    <script src="~/Assets/js/pg/Emergency.js?v=@DateTime.Now.ToString("yyyyMMddHH")"></script>
    <script>

        mui.showLoading("正在加载..", "div");

        setTimeout(function () {
            mui.hideLoading();
            mui.previewImage();
        }, 2000);
    </script>
}
